package mainGame;
import java.awt.geom.Point2D;

import com.golden.gamedev.object.Sprite;


public class Bubble
{
    private double x;
    private double y;
    private double t;
    private double phase;
    private Sprite bm;
    Bubble next;
    Bubble prev;
    private boolean shot;
    private boolean fish_inside;
    private double attach_x;
    private double attach_y;
    private double trans;
    private int combo;
    
    
    public double getPhase() 
    {
		return phase;
	}
	public void setPhase(double phase) 
	{
		this.phase = phase;
	}
	public void setSprite(Sprite sprite)
    {
    	this.bm = sprite;
    }
    public Sprite getSprite()
    {
    	return this.bm;
    }
    public void setShot(boolean isShot)
    {
    	this.shot = isShot;
    }
    public boolean isShot()
    {
    	return this.shot;
    }
    public void setAttachX(double xval)
    {
    	this.attach_x = xval;
    }
    public double getAttachX()
    {
    	return this.attach_x;
    }
    public void setAttachY(double yval)
    {
    	this.attach_y = yval;
    }
    public double getAttachY()
    {
    	return this.attach_y;
    }
    public boolean isFishInside()
    {
    	return this.fish_inside;
    }
    public void setFishInside(boolean isFishInside)
    {
    	this.fish_inside = isFishInside;
    }
    
    public boolean adjIsGoingToBurst()
    {
    	Sprite s = this.bm;
        int i = 1;
        for (Bubble b = this.prev; b != null && b.bm == s; b = b.prev)
            i++;
        for (Bubble b = this.next; b != null && b.bm == s; b = b.next)
            i++;
        return i >= 3;
    }
	public void setTrans(double trans) {
		this.trans = trans;
	}
	public double getTrans() {
		return trans;
	}
	public void setCombo(int combo) {
		this.combo = combo;
	}
	public int getCombo() {
		return combo;
	}
	public void setTime(double t) {
		this.t = t;
	}
	public double getTime() {
		return t;
	}
	public void setX(double x) {
		this.x = x;
	}
	public double getX() {
		return x;
	}
	public void setY(double y) {
		this.y = y;
	}
	public double getY() {
		return y;
	}
}
